<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Matplot1</title>
  </head>
  <body bgcolor="#FFFFFF">
    <center>Scilab Function</center>
    <div align="right">Last update : 04/12/2006</div>
    <p>
      <b>Matplot1</b> - 2D plot of a matrix using
  colors</p>
    <h3>
      <font color="blue">Calling Sequence</font>
    </h3>
    <dl>
      <dd>
        <tt>Matplot1(a,rect)</tt>
      </dd>
    </dl>
    <h3>
      <font color="blue">Parameters</font>
    </h3>
    <ul>
      <li>
        <tt>
          <b>a</b>
        </tt>: real matrix of size (n1,n2).</li>
      <li>
        <tt>
          <b>rect</b>
        </tt>: <tt>
          <b>[xmin,ymin,xmax,ymax]</b>
        </tt>
      </li>
    </ul>
    <h3>
      <font color="blue">Description</font>
    </h3>
    <p>The entries of matrix <tt>
        <b>int(a)</b>
      </tt> are used as colormap entries
    in the current colormap. <tt>
        <b>rect</b>
      </tt> specify a rectangle in the
    current scale and the matrix is drawn inside this rectangle. Each matrix
    entry will be rendered as a small rectangle filled with its associated
    color.</p>
    <h3>
      <font color="blue">Examples</font>
    </h3>
    <pre>

//--- first example
set figure_style new;
clf();
ax=gca();//get current axes handle
ax.data_bounds=[0,0;10,10];//set the data_bounds
ax.box='on'; //draw a box 
a=5*ones(11,11); a(2:10,2:10)=4; a(5:7,5:7)=2;
// first matrix in rectangle [1,1,3,3]
Matplot1(a,[1,1,3,3])
a=ones(10,10); a= 3*tril(a)+ 2*a; 
// second matrix in rectangle [5,6,7,8]
Matplot1(a,[5,6,7,8])

//--- second example  (animation)
n=100;

set figure_style new;
clf();
f=gcf();//get current figure handle
f.pixmap='on';//double buffer mode
ax=gca();//get current axes handle
ax.data_bounds=[0,0;10,10];//set the data_bounds
ax.box='on'; //draw a box 
show_pixmap()
for k=-n:n,
  a=ones(n,n);
  a= 3*tril(a,k)+ 2*a;
  a= a + a';
  k1= 3*(k+100)/200;
  if k&gt;-n then delete(gce()),end
  Matplot1(a,[k1,2,k1+7,9])
  show_pixmap() //send double buffer to screen
end

 
  </pre>
    <h3>
      <font color="blue">See Also</font>
    </h3>
    <p>
      <a href="colormap.htm">
        <tt>
          <b>colormap</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="plot2d.htm">
        <tt>
          <b>plot2d</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot.htm">
        <tt>
          <b>Matplot</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="grayplot.htm">
        <tt>
          <b>grayplot</b>
        </tt>
      </a>,&nbsp;&nbsp;<a href="Matplot_properties.htm">
        <tt>
          <b>Matplot_properties</b>
        </tt>
      </a>,&nbsp;&nbsp;</p>
    <h3>
      <font color="blue">Author</font>
    </h3>
    <p>J.Ph.C.</p>
  </body>
</html>
